import requests
import re
import execjs

session = requests.session()
cookies = {
    'sessionid': '4ki93yugkyyzhznovqx6u5erslc8pwr8'
}
response = session.get('https://www.python-spider.com/challenge/11', cookies=cookies)
jscode = re.match('<script>(.*)</script>', response.text).group(1)
with open('11.js', 'r', encoding='utf-8') as f:
    result = execjs.compile(f.read().replace('__jscodes', jscode)).call('decode')

print(result)

cookies[result.split('=')[0]] = result.split('=')[1].split(';')[0]
print(cookies)
response = session.get('https://www.python-spider.com/challenge/11', cookies=cookies)
print(response.text)